#ifndef DBBOOK_H
#define DBBOOK_H

#include <QObject>
#include <QtSql>
#include <QSqlDatabase>

enum DBstatus{
    CONNECTED,
    DISCONNECTED
};

class dbBook : public QObject
{
    Q_OBJECT
public:
    explicit dbBook(QObject *parent = 0);
    ~dbBook();
    int connectdb();//创建连接函数
    void closedb();

    DBstatus getDBstatus();
    bool IsbnIsNormative(QString &isbn);
private:
    QSqlDatabase db;

signals:

public slots:
private:
    DBstatus dbstatus;

};

#endif // DBBOOK_H
